/**
 * Copyright 2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng)
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package cn.well.cloud.sys.modular.system.controller;

import cn.hutool.core.bean.BeanUtil;
import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.core.util.ToolUtil;
import cn.stylefeng.roses.kernel.model.exception.RequestEmptyException;
import cn.stylefeng.roses.kernel.model.exception.ServiceException;
import cn.stylefeng.roses.kernel.model.exception.enums.CoreExceptionEnum;
import cn.stylefeng.roses.kernel.model.response.ResponseData;
import cn.stylefeng.roses.kernel.model.response.SuccessResponseData;
import cn.well.cloud.base.auth.context.LoginContextHolder;
import cn.well.cloud.base.auth.model.LoginUser;
import cn.well.cloud.base.oshi.SystemHardwareInfo;
import cn.well.cloud.sys.core.constant.factory.ConstantFactory;
import cn.well.cloud.sys.core.log.LogObjectHolder;
import cn.well.cloud.sys.core.util.DefaultImages;
import cn.well.cloud.sys.modular.system.entity.Notice;
import cn.well.cloud.sys.modular.system.entity.User;
import cn.well.cloud.sys.modular.system.model.UploadResult;
import cn.well.cloud.sys.modular.system.service.FileInfoService;
import cn.well.cloud.sys.modular.system.service.NoticeService;
import cn.well.cloud.sys.modular.system.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.List;

/**
 * 插件控制器
 *
 */
@Controller
@Slf4j
public class PluginsController extends BaseController {

    @Autowired
    private UserService userService;

    @Autowired
    private FileInfoService fileInfoService;

    @Autowired
    private NoticeService noticeService;

    /**
     * PDF预览页面
     *
     * @author fengshuonan
     * @Date 2018/12/24 22:43
     */

    @RequestMapping("/loadPdfFile")
    public String console() {
        return "/modular/frame/pdfview.html";
    }
}
